#include <iostream>
using namespace std;

class Cat
{
public:
    Cat(string name, int age)
    {
        this->name = name;
        this->age = age;
    }

    void show() const
    {
        cout << "name: " << name << " age: " << age << endl;
    }

    friend Cat operator+(const Cat &c1, const Cat &c2);

private:
    string name;
    int age;
};

Cat operator+(const Cat &c1, const Cat &c2)
{
    Cat c3(c1.name + c2.name, c1.age + c2.age);
    return c3;
}

int main()
{
    Cat c1("Tom", 3);
    Cat c2("Jerry", 2);
    Cat c3 = c1 + c2;
    c3.show();

    return 0;
}